//Guide Wrap Menu Functions
function guide_wrap_change(item, action)
{
	if (action==1)
	{
		if (typeof timeout_id !=="undefined")
		{
			clearTimeout(timeout_id);
		}
		
		guide_wrap_change_item(item, action);
	}else
	{
		timeout_id=setTimeout(function(){guide_wrap_change_item(item, action)}, 500);
	}
	
}

function guide_wrap_change_item(item, action)
{
	var Uhelp, Uaccount, Ucart, helpUnav, accauntUnav, cartUnav;
	
	var unavBody=document.getElementById("utility-nav");
	var unavBtm=document.getElementById("utility-nav-btm");
	
	Uhelp=document.getElementById("u_help");
	Uaccount=document.getElementById("u_account");
	Ucart=document.getElementById("u_cart");
	
	helpUnav=document.getElementById("unav-help");
	accauntUnav=document.getElementById("unav-account");
	cartUnav=document.getElementById("unav-cart");
	
	if (action==1)
	{
		unavBody.style.display="";
		unavBtm.style.display="";
		
		clear_guide_wrap();
		
		if (item=="u_help")
		{
			helpUnav.style.display="";
			helpUnav.setAttribute("aria-hidden",false);
			
			Uhelp.className="open";
			Uaccount.className="";
			Ucart.className="cart";
		}
		
		if(item=="u_account")
		{
			accauntUnav.style.display="";
			accauntUnav.setAttribute("aria-hidden",false);
			
			Uhelp.className="";
			Uaccount.className="open";
			Ucart.className="cart";
			
		}
		
		if(item=="u_cart")
		{
			cartUnav.style.display="";
			cartUnav.setAttribute("aria-hidden",false);
			
			Uhelp.className="";
			Uaccount.className="";
			Ucart.className="cart open";
		}
		
	}else if(action==0)
	{	
		Uhelp.className="";	
		Uaccount.className="";
		Ucart.className="cart";
			
		unavBody.style.display="none";
		unavBtm.style.display="none";
		
		clear_guide_wrap();
	}
}


function clear_guide_wrap() 
{ 
	var helpUnav, accauntUnav, cartUnav;
	
	helpUnav=document.getElementById("unav-help");
	accauntUnav=document.getElementById("unav-account");
	cartUnav=document.getElementById("unav-cart");
	
	if (helpUnav.style.display!="none")
	{
		helpUnav.style.display="none";
		helpUnav.setAttribute("aria-hidden",true);
	}
	
	if (accauntUnav.style.display!="none")
	{
		accauntUnav.style.display="none";
		accauntUnav.setAttribute("aria-hidden",true);
	}
	
	if (cartUnav.style.display!="none")
	{
		cartUnav.style.display="none";
		cartUnav.setAttribute("aria-hidden",true);
	}
}
//End of Guide Wrap Menu Functions